import { reactive, onMounted } from 'vue'
import { getCategoryGoodsList } from 'network/category'
export default function() {
  let categoryData = reactive({
    // 分类数据
    categories: []
  })
  // 发送category的网络请求
  onMounted(async () => {
    const res = await getCategoryGoodsList()
    categoryData.categories = res.categories
  })

  return categoryData
}
